package com.kpx.app.bean;


import com.kpx.app.configs.Constants;

import java.io.Serializable;

/**
 * 创建时间： 2015/7/2 16:10
 * 作者：Ryan
 * 类描述：
 */
public class ImageBean implements Serializable, Comparable<ImageBean> {
    private boolean checked;
    private String url;
    /**
     * 图片的拍摄时间
     */
    private long dateTaken;
    private String thumbnailPath;
    private String thumbnailUri;

    public String getThumbnailUri() {
        return "file://" + thumbnailPath;
    }

    public void setThumbnailUri(String thumbnailUri) {
        this.thumbnailUri = thumbnailUri;
    }

    public String getThumbnailPath() {
        return thumbnailPath;
    }

    public void setThumbnailPath(String thumbnailPath) {
        this.thumbnailPath = thumbnailPath;
    }

    public long getDateTaken() {
        return dateTaken;
    }

    public void setDateTaken(long dateTaken) {
        this.dateTaken = dateTaken;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        if (!Constants.DEBUG) {
            return super.toString();
        }
        return "ImageBean{" +
                "checked=" + checked +
                ", url='" + url + '\'' +
                ", dateTaken=" + dateTaken +
                ", thumbnailPath='" + thumbnailPath + '\'' +
                '}';
    }

    @Override
    public int compareTo(ImageBean another) {
        if (another.dateTaken > dateTaken) {
            return 1;
        } else {
            return -1;
        }
    }
}
